def ResNeXt50(img_paths, labels, return_prob=0):
    import numpy as np
    import keras
    from keras.preprocessing import image
    from keras_applications.resnext import ResNeXt50 #这里不用点了
    from keras_applications.resnext import preprocess_input
    from keras.applications.resnet50 import decode_predictions 
    model = ResNeXt50(weights="imagenet", 
                  include_top=True,
                  input_shape=(224, 224, 3),
                  backend=keras.backend,
                  layers=keras.layers,
                  models=keras.models,
                  utils=keras.utils)
    preds = []
    preds_prob = []
    for img_path in img_paths:
        img = image.load_img(img_path, target_size=(224, 224))
        x = image.img_to_array(img) # 转化为浮点型
        x = np.expand_dims(x, axis=0) # 转化为张量size为(1, 224, 224, 3)
        x = preprocess_input(x
                     ,data_format= "channels_first" #必须加上！
                    )
        features = model.predict(x)
        pred=decode_predictions(features, top=0)[0][0][1] # 获取imageNet的标签
        if return_prob > 0:
            pred_prob=decode_predictions(features, top=return_prob)[0][0][2] # 获取imageNet的标签的预测概率
            preds_prob.append(pred_prob)
        preds.append(pred)
    return preds, preds_prob

def ResNeXt101(img_paths, labels, return_prob=0):
    import numpy as np
    import keras
    from keras.preprocessing import image
    from keras_applications.resnext import ResNeXt101 #这里不用点了
    from keras_applications.resnext import preprocess_input
    from keras.applications.resnet50 import decode_predictions 
    model = ResNeXt101(weights="imagenet", 
                  include_top=True,
                  input_shape=(224, 224, 3),
                  backend=keras.backend,
                  layers=keras.layers,
                  models=keras.models,
                  utils=keras.utils)
    preds = []
    preds_prob = []
    for img_path in img_paths:
        img = image.load_img(img_path, target_size=(224, 224))
        x = image.img_to_array(img) # 转化为浮点型
        x = np.expand_dims(x, axis=0) # 转化为张量size为(1, 224, 224, 3)
        x = preprocess_input(x
                     ,data_format= "channels_first" #必须加上！
                    )
        features = model.predict(x)
        pred=decode_predictions(features, top=0)[0][0][1] # 获取imageNet的标签
        if return_prob > 0:
            pred_prob=decode_predictions(features, top=return_prob)[0][0][2] # 获取imageNet的标签的预测概率
            preds_prob.append(pred_prob)
        preds.append(pred)
    return preds, preds_prob
